for iAnt in cmds.ls('ant_all*' , tr=1):
    ant = getHich(iAnt)
    for x in range( cmds.playbackOptions(q=1,aet=1)):
        cmds.currentTime(x+1) 
        antwalk(ant)
        for lg in ant['legs']:
            map( lambda s :cmds.setKeyframe( lg ,at='translate'+s ) , 'XY' )